package com.joinway.framework.extension.console.pdf;

import java.util.List;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

public class Paragraph {

	/**
	 * 章节标题
	 */
	private String title;
	
	/**
	 * 章节级别，从1开始
	 */
	private int level;
	
	/**
	 * 本章开始页号
	 */
	private int startPageNumber;

	/**
	 * 本章结束页号
	 */
	private int endPageNumber;
	
	/**
	 * 子章节
	 */
	private List<Paragraph> paragraphs;
	
	@Override
	public String toString() {
		return new ReflectionToStringBuilder(this, getToStringStyle()).toString();
	}

	protected ToStringStyle getToStringStyle(){
		return ToStringStyle.MULTI_LINE_STYLE;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public List<Paragraph> getParagraphs() {
		return paragraphs;
	}

	public void setParagraphs(List<Paragraph> paragraphs) {
		this.paragraphs = paragraphs;
	}

	public int getStartPageNumber() {
		return startPageNumber;
	}

	public void setStartPageNumber(int startPageNumber) {
		this.startPageNumber = startPageNumber;
	}

	public int getEndPageNumber() {
		return endPageNumber;
	}

	public void setEndPageNumber(int endPageNumber) {
		this.endPageNumber = endPageNumber;
	}
	
}

